package com.client.controller;

import com.portal.sso.core.config.SsoConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Slf4j
@Controller
public class Index {
    @GetMapping("/index")
    @ResponseBody
    public String GetIndex(HttpServletRequest request, HttpServletResponse response){
        String userId =request.getAttribute(SsoConfig.SSO_USER_ID).toString();

        return userId+"你好，欢迎来到demo的世界";
    }
}
